import { NoSkinCellRenderer } from "../../../common/item/NoSkinCellRenderer";
import { Cache } from "../../../../cache/Cache";
import { ObjCreate } from "../../../common/ObjCreate";
import { ImagesConst } from "../../../../resource/ImagesConst";
import { GTextFiled } from "../../../../../../com/mui/controls/GTextFiled";
type int = number;
//class KingChampionShipResultTabRender2
    
    export  class KingChampionShipResultTabRender2 extends NoSkinCellRenderer
    {
        constructor()
        {
            super();
            this.initView();
            return;
        }

        public /* override */ set data(arg1: Object)
        {
            var loc1=0;
            this._txtRank.text = arg1["rank"];
            this._txtName.text = arg1["name"];
            this._txtKillScore.text = arg1["killScore"];
            this._txtScore.text = arg1["guildScore"];
            this._totalScore.text = arg1["totalScore"];
            if (arg1["name"] == Cache.instance.role.playerInfo.name) 
            {
                loc1 = 65280;
                this._txtRank.textColor = loc1;
                this._txtName.textColor = loc1;
                this._txtKillScore.textColor = loc1;
                this._txtScore.textColor = loc1;
                this._totalScore.textColor = loc1;
            }
            return;
        }

        /* internal  */initView(): void
        {
            this._txtRank = this.createText(0, 10, 83, 20);
            this._txtName = this.createText(0, 10, 240, 20);
            this._txtKillScore = this.createText(160, 10, 70, 20);
            this._txtScore = this.createText(250, 10, 70, 20);
            this._totalScore = this.createText(322, 10, 91, 20);
            ObjCreate.createBg(5, 34, 408, 1, this, ImagesConst.SplitLine);
            return;
        }

        /* internal  */createText(arg1: int, arg2: int, arg3: int, arg4: int): GTextFiled
        {
            var loc1;
            var loc2;
            (loc2 = (loc1 = ObjCreate.createGTextField("", arg1, arg2, arg3, arg4, this)).defaultTextFormat).align = flash.text.TextFormatAlign.CENTER;
            loc1.defaultTextFormat = loc2;
            return loc1;
        }

        /* internal */ /* var */_txtRank: GTextFiled;

        /* internal */ /* var */_txtName: GTextFiled;

        /* internal */ /* var */_txtKillScore: GTextFiled;

        /* internal */ /* var */_txtScore: GTextFiled;

        /* internal */ /* var */_totalScore: GTextFiled;
    }
